<?php
namespace Components\Account\User;

class Filter extends \Phalcon\Filter implements \Phalcon\FilterInterface {
  public function checkPhone($value) {
    return $this -> sanitize($value, ['string','trim']);
  }

  public function checkReal_name($value) {
    return $this -> sanitize($value, ['string','trim']);
  }

  public function checkPassword($value) {
    return Adapter::getDI('security') -> hash($value);
  }

  public function checkSafe_password($value) {
    return Adapter::getDI('security') -> hash($value);
  }

  public function checkUser_level($value) {
    return $this -> sanitize($value, 'int');
  }

  public function checkShop_level($value) {
    return $this -> sanitize($value, 'int');
  }

  public function checkStatus($value) {
    return $this -> sanitize($value, 'int');
  }
}
